package com.jjq.movebooking.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jjq.movebooking.entity.User;
import com.jjq.movebooking.mapper.UserMapper;
import com.jjq.movebooking.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

//    private Logger log = LoggerFactory.getLogger(UserMapper.class);
//
//    @Autowired
//    private UserMapper userMapper;
//
//    @Override
//    public User login(User user) {
//        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
//        queryWrapper.eq("user_name",user.getUserName());
//        queryWrapper.eq("password",user.getPassword());
//        User user1 = userMapper.selectOne(queryWrapper);
//        if (user1!=null){
//            model.addAttribute("user",user1);
//            return "redirect:/list";
//        }else {
//            return "login";
//        }
//    }
}
